package com.yunkeji.dao.mapper;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yunkeji.common.core.mapper.BaseMapperPlus;
import com.yunkeji.dao.domain.CallVoiceCheck;
import com.yunkeji.dao.domain.UserCheck;
import com.yunkeji.dao.vo.CallVoiceCheckVo;
import com.yunkeji.dao.vo.UserCheckVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 用户信息审核Mapper接口
 *
 * @author 老张
 * @date 2024-05-27
 */
public interface UserCheckMapper extends BaseMapperPlus<UserCheckMapper, UserCheck, UserCheckVo> {

    @Select("<script>" +
        "SELECT  " +
        "c.*,  " +
        "u.sex as userSex " +
        "FROM  " +
        "ykj_user_check c  " +
        "LEFT JOIN ykj_app_user u ON c.user_id = u.id " +
        "where c.del_flag=0 " +
        "<if test='platformId!=null'>" +
        "and c.platform_id = #{platformId} " +
        "</if>" +
        "<if test='checkType!=null'>" +
        "and c.check_type = #{checkType} " +
        "</if>" +
        "<if test='status!=null'>" +
        "and c.status = #{status} " +
        "</if>" +
        "order by c.create_time desc " +
        "</script>")
    Page<UserCheckVo> selectListPage(@Param("platformId") Long platformId,
                                          @Param("checkType") Integer checkType,
                                          @Param("status") Integer status,
                                          @Param("Page") Page<UserCheck> Page);

}
